package org.nfIt.th02;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * ClossName:MainTest
 * Pakage:org.nfIt.th02
 * Description
 *
 * @Author L
 * @Create 2024/5/18 20:27
 * @Version 2023.1.3
 */
public class MainTest {
    public static void main(String[] args) {
        //创建list集合用于存储奖品
        List<String> productList = new ArrayList<>();
        //添加奖品
        Collections.addAll(productList,"苹果手机","华为荣耀","扫地机器人");
        //实例对象
        ProductGetter<String> spg = new ProductGetter<>();

        //遍历添加奖品
        for (int i = 0; i < productList.size(); i++) {
            spg.addProduct(productList.get(i));
        }
        //获取商品
        System.out.println(spg.getProducts());
    }
}
